<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>固定定位</title>
    <style>
        /**{*/
        /*    margin: 0px;*/
        /*    padding: 0px;*/
        /*}*/
        .container {
            width: 1000px;
            height: 800px;
            border: 1px solid purple;
            position: fixed;
            margin-left: 200px;
        }

        div {
            width: 200px;
            height: 100px;
        }

        .c1 {
            background: red;
            position: fixed;
            z-index: 5;
            left: 200px;
            top: 0px;
        }

        .c2 {
            background: green;
            position: fixed;
            z-index: 2;
            top: 100px;
            left: 0px;
            top: 100px;
        }

        .c3 {
            background: blue;
            position: fixed;
            z-index: 3;
            left: 200px;
            top: 200px;
        }

        .c4 {
            background: purple;
            position: fixed;
            z-index: 4;
            left: 400px;
            top: 100px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="c1"></div>
    <div class="c2"></div>
    <div class="c3"></div>
    <div class="c4"></div>
</div>
</body>
</html>